/*
 * Copyright (c) 2017. jiangyc <710183940@qq.com>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package com.jiangyc.bingpictures.spi;

import com.jiangyc.bingpictures.bean.Picture;

public interface PictureLoader {
    /**
     * 横屏模式
     */
    public static final String ORIENTATION_HORIZONTAL = "horizontal";
    /**
     * 竖屏模式
     */
    public static final String ORIENTATION_VERTICAL = "vertical";

    /**
     * 图片数量
     * @return
     */
    public int count();

    /**
     * 获取某一张图片，范围：[0, count)
     * @param index
     * @return
     */
    public Picture getPicture(int index);

    /**
     *  获取某一张图片，范围：[0, count)
     * @param index
     * @param orientation
     * @return
     */
    public Picture getPicture(int index, String orientation);

    /**
     * 是否是竖屏图片
     * @param picture
     * @return
     */
    public boolean isVertical(Picture picture);

    /**
     * 是否是横屏图片
     * @param picture
     * @return
     */
    public boolean isHorizontal(Picture picture);

    /**
     * 设置图片横屏竖屏模式
     * @param picture
     * @param orientation
     * @return
     */
    public Picture setOrientation(Picture picture, String orientation);
}
